$(function(){
    checkLoginStatus();
    num();
    function num(){
        var num = 0;
        var option = {
            url : HOST+'/admin/pay.php',
            data : {
                getType : 'pay',
                user : LsyCookie.getItem('loginUserName')
            }
        }
        request(option).then(function(data){
            data.forEach(function(item){
                num += item.price*1;
            });
            $('#Numbering').html(new Date().getTime());
            $('#price').html(num);
        });
    }
    $('#payNow').tap(function(){
        if(Math.random()*10<5){
            window.location.href = '../html/pay_success.html'
        }else{
            window.location.href = '../html/pay_failure.html'
        }
    });
})